<template>
  <div class="app">
    <router-view v-slot="{ Component }">
      <keep-alive include="home">
        <component :is="Component"></component>
      </keep-alive>
    </router-view>
  </div>
  <tabBar v-if="!route.meta.hideTabbar"></tabBar>
  <!-- <loading v-if="isLoading"></loading> -->
</template>

<script setup lang="ts">
import tabBar from './components/tab-bar.vue'
import { useRoute } from 'vue-router'
import loading from './components/loading/loading.vue'
import useMainStore from './stores/modules/main.ts'
import { storeToRefs } from 'pinia'

const mainStore = useMainStore()
const route = useRoute()
const { isLoading } = storeToRefs(mainStore)
</script>

<style lang="scss" scoped>
.app {
  height: 100%;
  box-sizing: border-box;
  padding-bottom: 50px;
  .tab-bar {
    flex: 1;
  }
}
</style>
